package com.dfbz.demo02_InputStream;

import java.io.FileInputStream;
import java.io.InputStream;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_读取单个字符 {
    public static void main(String[] args) throws Exception {

        InputStream is = new FileInputStream("001.txt");

        int data = is.read();
        System.out.println((char)data);           // 97

        data = is.read();
        System.out.println((char)data);           // 98

        data = is.read();
        System.out.println((char)data);           // 99

        data = is.read();
        System.out.println(data);           // ?

        data = is.read();
        System.out.println(data);           // ?

        is.close();

    }
}
